<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>员工列表</title>
    <link rel="stylesheet" th:href="@{/static/css/index_work.css}">
    <link rel="stylesheet" th:href="@{/static/layui/css/layui.css}">
</head>
<body>
<div class="width:80%">
    <table class="layui-table">
        <colgroup>
            <col width="150">
            <col width="200">
            <col>
        </colgroup>
        <thead>
        <tr>
            <th colspan="6">员工列表</th>
        </tr>
        <tr>
            <th>流水号</th>
            <th>员工姓名</th>
            <th>年龄</th>
            <th>性别</th>
            <th>邮箱</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="employee,status : ${page.list}">
            <td th:text="${status.count}"></td>
            <td th:text="${employee.empName}"></td>
            <td th:text="${employee.age}"></td>
            <td th:text="${employee.gender}"></td>
            <td th:text="${employee.email}"></td>
            <td>
                <a href="">删除</a>
                <a href="">修改</a>
            </td>
        </tr>
        </tbody>
    </table>
</div>
<div style="text-align: center">
    <a th:disabled="${page.hasPreviousPage==false}"  th:href="@{/employee/page/1/4}">首页</a>
    <a th:disabled="${page.hasPreviousPage==false}" th:href="@{|/employee/page/${page.prePage}/4|}">上一页</a>
    <span th:each="num : ${page.navigatepageNums}">
        <a th:if="${page.pageNum == num}" style="color:red" th:href="@{|/employee/page/${num}/4|}" th:text="|[${num}]|"></a>
        <a th:unless="${page.pageNum == num}" th:href="@{|/employee/page/${num}/4|}" th:text="${num}"></a>
    </span>
    <a th:disabled="${!page.hasNextPage}" th:href="@{|/employee/page/${page.nextPage}/4|}">下一页</a>
    <a th:disabled="${!page.hasNextPage}" th:href="@{|/employee/page/${page.pages}/4|}">末页</a>
</div>
</body>
</html>